﻿@using System.Web
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>职称设置</title>
    <script src="~/lib/vue.global.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <link rel="stylesheet" href="//unpkg.com/element-plus/dist/index.css">
    <script src="//unpkg.com/element-plus"></script>
    <style>
        body {
            background-color: #FFFFCC;
        }

        .solid-table {
            border-collapse: collapse;
            width: 100%;
        }

            .solid-table td {
                border: 1px solid #333;
                padding: 8px;
                text-align: left;
            }

        .bj {
            background-color: #FFD553;
        }

        .kuan {
            width: 240px;
        }

        .timer {
            display: inline-block;
            margin-left: 10px;
            color: #f56c6c;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="content-container">
            <div class="header">
                <div class="breadcrumb">您正在做的业务是:人力资源管理--薪酬标准管理--薪酬标准登记查询</div>
            </div>
            <br />
            <table class="solid-table">
                <tr>
                    <td class="bj">薪酬标准编号</td>
                    <td class="kuan">{{Dig}}</td>
                    <td class="bj">薪酬标准名称</td>
                    <td class="kuan">{{xc_name}}</td>
                    <td class="bj">薪酬总额</td>
                    <td class="kuan">{{ze}}</td>
                    <td class="bj"></td>
                </tr>
                <tr>
                    <td class="bj">制定人</td>
                    <td class="kuan">{{zdr}}</td>
                    <td class="bj">复核人</td>
                    <td class="kuan">{{djr}}</td>
                    <td class="bj">登记时间</td>
                    <td class="kuan">
                        {{djsj}}
                    </td>
                    <td class="bj"></td>
                </tr>
                <tr>
                    <td class="bj">复核意见</td>
                    <td colspan="6">
                        {{fhyj}}
                    </td>
                </tr>
                @if (ViewBag.list2 == "aaa")
                {
                    <tr>
                        <td class="bj">序号</td>
                        <td class="bj" colspan="2">薪酬项目名称</td>
                        <td class="bj" colspan="4">金额</td>
                    </tr>
                    <tbody id="employee-table-body">
                        @foreach (var item in ViewBag.list)
                        {
                            <tr>
                                <td>@item.sdt_id</td>
                                <td colspan="2">@item.item_name</td>
                                <td colspan="4">
                                    <input value="@item.salary"
                                           data-id="@item.sdt_id" />
                                </td>
                            </tr>
                        }
                    </tbody>
                }

            </table>
        </div>
        <br />
        <div style="text-align:center">
            <el-button type="primary" onclick="history.back()">返回</el-button>
        </div>
    </div>

    <script>
       

        const { createApp, ref, reactive } = Vue;

        const app = createApp({
            setup() {
                const s_id = ref("@ViewBag.s_id");
                const Dig = ref();
                const xc_name = ref();
                const ze = ref();
                const zdr = ref();
                const djr = ref();
                const djsj = ref();
                const fhyj = ref();
                function fill(){
                   axios.get(`/SS_Search/Index3?s_id=${s_id.value}`)
                        .then(res => {
                            let row = res.data.zhi;
                            Dig.value = row.standard_id;
                            xc_name.value = row.standard_name;
                            ze.value = row.salary_sum;
                            zdr.value = row.designer;
                            djr.value = row.register;
                            djsj.value = row.regist_time;
                            fhyj.value = row.remark;
                        })
                        .catch(err => {
                            console.error('数据加载失败:', err);
                            ElMessage.error('数据加载失败，请重试');
                        });
                }
                fill();
                return {
                    Dig,
                    xc_name,
                    ze,
                    zdr,
                    djr,
                    djsj,
                    fhyj
                }
            }
        });

        app.use(ElementPlus);
        app.mount('#app');
    </script>
</body>
</html>
